package com.bwda.dsrs.filecenter.service.impl;

import com.bwda.dsrs.filecenter.domain.po.registerkey.RegisterKeyPo;
import com.bwda.dsrs.filecenter.domain.condition.registerkey.RegisterKeyCondition;
import com.bwda.dsrs.filecenter.mapper.dsrs.RegisterKeyMapper;
import com.bwda.dsrs.filecenter.service.RegisterKeyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author Administrator
 */
@Service
public class RegisterKeyServiceImpl extends BaseServiceImpl<RegisterKeyPo, RegisterKeyCondition, RegisterKeyMapper> implements RegisterKeyService {
    @Autowired
    private RegisterKeyService registerKeyPoService;
    @Override
    public List<RegisterKeyPo> queryRegisterKeyList(Integer keyRuleId) {
        RegisterKeyCondition registerKeyCondition = new RegisterKeyCondition();
        registerKeyCondition.setKeyRuleId(keyRuleId);
        List<RegisterKeyPo> registerKeyPo = registerKeyPoService.queryList(registerKeyCondition);
        return registerKeyPo;
    }
    @Override
    public List<RegisterKeyPo> queryRegisterKeyByAppId(Integer appId) {
        return this.getMapper().queryRegisterKeyByAppId(appId);
    }

    @Override
    public int countByTaskCode(RegisterKeyPo po) {
        return this.getMapper().countByTaskCode(po);
    }

    @Override
    public int countByDefault(Integer appId) {
        return this.getMapper().countByDefault(appId);
    }


}